
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type UserBrokerageRequest struct {

	Uid string `json:"uid" form:"uid"`

	LinkId string `json:"link_id" form:"link_id"`

	Type string `json:"type" form:"type"`

	Title string `json:"title" form:"title"`

	Number string `json:"number" form:"number"`

	Balance string `json:"balance" form:"balance"`

	Pm string `json:"pm" form:"pm"`

	Mark string `json:"mark" form:"mark"`

	Status string `json:"status" form:"status"`

	Take string `json:"take" form:"take"`

	FrozenTime string `json:"frozen_time" form:"frozen_time"`

	AddTime string `json:"add_time" form:"add_time"`

}

func (r *UserBrokerageRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *UserBrokerageRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"uid": "required",

		"link_id": "required",

		"type": "required",

		"title": "required",

		"number": "required",

		"balance": "required",

		"pm": "required",

		"mark": "required",

		"status": "required",

		"take": "required",

		"frozen_time": "required",

		"add_time": "required",

	}
}

func (r *UserBrokerageRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *UserBrokerageRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *UserBrokerageRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
